<%@page import="com.shsh.safemanage.util.Constants"%>
<%@page import="com.shsh.safemanage.model.PostcheckContent"%>
<%@page import="java.util.List"%>
<%@page import="com.shsh.safemanage.dao.DaoCreator"%>
<%@page import="com.shsh.safemanage.dao.PostCheckDao"%>
<%@ page language="java" pageEncoding="UTF-8"%>

<%
{
	
PostCheckDao postcheckDao = DaoCreator.createPostCheckDao();


Long thePostcheckPatternID = 0L;
Long thePostcheckContentID = 0L;
String postcheckPatternIDStr = (String)request.getParameter(Constants.REQUEST_PARAMETER_POSTCHECK_PATTERN_ID);
String postcheckContentIDStr = (String)request.getParameter(Constants.REQUEST_PARAMETER_POSTCHECK_CONTENT_ID);
try{
	thePostcheckPatternID = Long.parseLong(postcheckPatternIDStr);
}catch(Exception e){
	
}
List<PostcheckContent> contentList = postcheckDao.getPostcheckContentByPostcheckPatternID(thePostcheckPatternID);
try{
	thePostcheckContentID = Long.parseLong(postcheckContentIDStr);
}catch(Exception e){
	
}
%>
<select id="postcheckContent" onchange="selectContent();">
<%
for (PostcheckContent content: contentList) {
%>
	<option value="<%=content.getId()%>" <%=thePostcheckContentID.equals(content.getId())? "selected":""%>><%=content.getContent()%></option>
<%
}
%>
</select>
<%
}
%>